package com.xbongbong.paas.domain.entity.ext;


import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author: wufeng
 * @date: 2018/11/27 19:36
 * @desrcption: 附件对象
 */
@Getter
@Setter
@ToString
@EqualsAndHashCode
public class PaasAttachmentEntityExt implements Serializable {

    private static final long serialVersionUID = -9220528088636677365L;

    /**
     * 文件名称
     */
    @NotNull(message = "文件名不可为空")
    @NotEmpty(message = "文件名不可为空")
    private String filename;
    /**
     * 文件资源路径
     */
    @NotNull(message = "文件资源路径不可为空")
    @NotEmpty(message = "文件资源路径不可为空")
    private String attachIndex;
    /**
     * 扩展类型
     */
    @NotNull(message = "扩展类型不可为空")
    @NotEmpty(message = "扩展类型不可为空")
    private String ext;
    /**
     * 文件大小
     */
    @NotNull(message = "文件大小不可为空")
    private Integer size;

    public PaasAttachmentEntityExt(){}

    public PaasAttachmentEntityExt(String filename, String attachIndex, String ext, Integer size) {
        this.filename = filename;
        this.attachIndex = attachIndex;
        this.ext = ext;
        this.size = size;
    }
}
